package com.bank.services;

import java.util.List;

import javax.annotation.Resource;
import javax.transaction.Transactional;

import org.springframework.stereotype.Service;

import com.bank.daos.UserDaoI;
import com.bank.models.User;

@Service("userService")
@Transactional
public class UserServiceImpl implements UserServiceI{
	
	@Resource(name="userDao")
	private UserDaoI userDao;
	
	public void addUser(User user) {
		userDao.addUser(user);
	}
	
	public List<User> list(){
		return userDao.list();
	}

	@Override
	public void save(User user) {
		userDao.save(user);
	}

	@Override
	public void delete(User user) {
		userDao.delete(user);
	}

	@Override
	public void update(User user) {
		userDao.update(user);
	}
}